import { defineStore } from 'pinia'
import { store } from "@/stores";

const useBrandStore = defineStore({
  id: "brand",
  state: () => ({
    id: '',
    name: '',
    imagePath: '',
    description: '',
  }),
  actions: {
    async setBrand(brand: any) {
      this.id = brand.id;
      this.name = brand.name;
      this.imagePath = brand.imagePath;
      this.description = brand.description;
    }
  },
  persist: true,
})

export function useBrandStoreHook() {
  return useBrandStore(store);
}
